package com.bw.shopping.mvvm.model;

import com.bw.mvvm_common.entity.BaseEntity;
import com.bw.mvvm_common.mvvm.model.BaseModel;
import com.bw.mvvm_common.network.HttpEnum;
import com.bw.mvvm_common.network.HttpFactory;

import java.util.HashMap;

import io.reactivex.Observable;

/**
 * @author KK
 * @description:
 * @date :2021/10/29 13:37
 */
public class AdressModel extends BaseModel {

    //地址列表
    public Observable<BaseEntity> requestAdressList(HashMap<String,Object> map){
        return changeFunc(HttpFactory.create(HttpEnum.TokenSign)
        .getRetrofit()
        .create(Api.class)
        .requestAdressList(createBody(map)));
    }

    //删除地址
    public Observable<BaseEntity> requestDeleteAdress(HashMap<String,Object> map){
        return changeFunc(HttpFactory.create(HttpEnum.TokenSign)
                .getRetrofit()
                .create(Api.class)
                .requestDeleteAdress(createBody(map)));
    }


}
